<template>
	<view class="container">
		<view class="box">
			<view class="tupian">
				<image src="../../../static/home/data.png"></image>
			</view>
			<view class="information">
				<view class="description">已累计服务宠物</view>
				<view class="number">{{num}}</view>
				<view class="description">截至目前</view>
			</view>
		</view>
	</view>
</template>

<script lang="ts" setup>
	import {ref,reactive} from "vue"
	import {onShow} from "@dcloudio/uni-app"
	import http from "@/utils/request.js"
	onShow(()=>{
		let response=http.get('/data/getpetnum')
		response.then(res=>{
			if(res.data.code===200){
				num.value=res.data.data
			}
		})
	})
	let num=ref(0)
</script>

<style lang="scss">
	.container{
		display: flex;
		align-items: center;
		justify-content: center;
		width: 100%;
		
		.box{
			display: flex;
			width: 70%;
			height: 200rpx;
			
			.tupian{
				width: 40%;
				height: 100%;
				margin-right: 30rpx;
				image{
					width: 80%;
					height: 80%;
				}
			}
			
			.information{
				flex-grow: 1;
				height: 100%;
				display: flex;
				flex-direction: column;
				.description{
					width: 100%;
					font-size: 30rpx;
					margin:5rpx 0;
				}
				
				.number{
					width: 100%;
					font-size: 50rpx;
					margin: 5rpx 0;
					color: #ff5e6c;
				}
			}
		}
	}
</style>
